Skip to content

Conversation

OliverWoolland
Copy link

Summary

Adds optional authentication support by allowing username and password to be set via CLI arguments.

This should enable connections to brokers which disallow anonymous connections or if authentication is expected.

Defaults remain unchanged (guest/guest), so existing usage should be unaffected.

Details

  • Adds --mqtt-username and --mqtt-password CLI args to pytest-mqtt
  • Updates the fixtures / clients to accept credentials
  • Documents new arguments in README.rst

Copy link

codecov bot commented Jun 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.08%. Comparing base (ab524fd) to head (0e29dba).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   95.90%   96.08%   +0.18%     
==========================================
  Files           5        5              
  Lines         171      179       +8     
==========================================
+ Hits          164      172       +8     
  Misses          7        7              
Flag Coverage Δ
unittests 96.08% <100.00%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OliverWoolland OliverWoolland marked this pull request as draft June 25, 2025 10:28
@OliverWoolland OliverWoolland marked this pull request as ready for review June 25, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant